/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package digital_ink;

import com.sun.rave.web.ui.appbase.AbstractFragmentBean;
import com.sun.webui.jsf.component.Hyperlink;
import com.sun.webui.jsf.component.StaticText;
import javax.faces.FacesException;

/**
 * <p>Fragment bean that corresponds to a similarly named JSP page
 * fragment.  This class contains component definitions (and initialization
 * code) for all components that you have defined on this fragment, as well as
 * lifecycle methods and event handlers where you may add behavior
 * to respond to incoming events.</p>
 *
 * @version fragCentral4.java
 * @version Created on 17/12/2008, 01:10:01 AM
 * @author Anya
 */

public class fragCentral4 extends AbstractFragmentBean {
    // <editor-fold defaultstate="collapsed" desc="Managed Component Definition">

    /**
     * <p>Automatically managed component initialization. <strong>WARNING:</strong>
     * This method is automatically generated, so any user-specified code inserted
     * here is subject to being replaced.</p>
     */
    private void _init() throws Exception {
    }
    private Hyperlink agsus = new Hyperlink();

    public Hyperlink getAgsus() {
        return agsus;
    }

    public void setAgsus(Hyperlink h) {
        this.agsus = h;
    }
    private StaticText ag1a = new StaticText();

    public StaticText getAg1a() {
        return ag1a;
    }

    public void setAg1a(StaticText st) {
        this.ag1a = st;
    }
    private StaticText ag1b = new StaticText();

    public StaticText getAg1b() {
        return ag1b;
    }

    public void setAg1b(StaticText st) {
        this.ag1b = st;
    }
    private Hyperlink aginstruccion = new Hyperlink();

    public Hyperlink getAginstruccion() {
        return aginstruccion;
    }

    public void setAginstruccion(Hyperlink h) {
        this.aginstruccion = h;
    }
    private Hyperlink agpersonal = new Hyperlink();

    public Hyperlink getAgpersonal() {
        return agpersonal;
    }

    public void setAgpersonal(Hyperlink h) {
        this.agpersonal = h;
    }
    private StaticText ag1c = new StaticText();

    public StaticText getAg1c() {
        return ag1c;
    }

    public void setAg1c(StaticText st) {
        this.ag1c = st;
    }
    private StaticText agd = new StaticText();

    public StaticText getAgd() {
        return agd;
    }

    public void setAgd(StaticText st) {
        this.agd = st;
    }
    private StaticText ag1e = new StaticText();

    public StaticText getAg1e() {
        return ag1e;
    }

    public void setAg1e(StaticText st) {
        this.ag1e = st;
    }
    private StaticText ag1f = new StaticText();

    public StaticText getAg1f() {
        return ag1f;
    }

    public void setAg1f(StaticText st) {
        this.ag1f = st;
    }
    private StaticText ag2a = new StaticText();

    public StaticText getAg2a() {
        return ag2a;
    }

    public void setAg2a(StaticText st) {
        this.ag2a = st;
    }
    private StaticText ag2b = new StaticText();

    public StaticText getAg2b() {
        return ag2b;
    }

    public void setAg2b(StaticText st) {
        this.ag2b = st;
    }
    private StaticText ag2c = new StaticText();

    public StaticText getAg2c() {
        return ag2c;
    }

    public void setAg2c(StaticText st) {
        this.ag2c = st;
    }
    private StaticText ag2d = new StaticText();

    public StaticText getAg2d() {
        return ag2d;
    }

    public void setAg2d(StaticText st) {
        this.ag2d = st;
    }
    private StaticText ag2e = new StaticText();

    public StaticText getAg2e() {
        return ag2e;
    }

    public void setAg2e(StaticText st) {
        this.ag2e = st;
    }
    private StaticText ag2f = new StaticText();

    public StaticText getAg2f() {
        return ag2f;
    }

    public void setAg2f(StaticText st) {
        this.ag2f = st;
    }
    private StaticText ag2g = new StaticText();

    public StaticText getAg2g() {
        return ag2g;
    }

    public void setAg2g(StaticText st) {
        this.ag2g = st;
    }
    private StaticText ag2h = new StaticText();

    public StaticText getAg2h() {
        return ag2h;
    }

    public void setAg2h(StaticText st) {
        this.ag2h = st;
    }
    private StaticText ag3a = new StaticText();

    public StaticText getAg3a() {
        return ag3a;
    }

    public void setAg3a(StaticText st) {
        this.ag3a = st;
    }
    private StaticText ag3b = new StaticText();

    public StaticText getAg3b() {
        return ag3b;
    }

    public void setAg3b(StaticText st) {
        this.ag3b = st;
    }
    private StaticText ag3c = new StaticText();

    public StaticText getAg3c() {
        return ag3c;
    }

    public void setAg3c(StaticText st) {
        this.ag3c = st;
    }
    private StaticText ag3d = new StaticText();

    public StaticText getAg3d() {
        return ag3d;
    }

    public void setAg3d(StaticText st) {
        this.ag3d = st;
    }
    private StaticText ag3e = new StaticText();

    public StaticText getAg3e() {
        return ag3e;
    }

    public void setAg3e(StaticText st) {
        this.ag3e = st;
    }
    private StaticText ag3f = new StaticText();

    public StaticText getAg3f() {
        return ag3f;
    }

    public void setAg3f(StaticText st) {
        this.ag3f = st;
    }
    private Hyperlink back = new Hyperlink();

    public Hyperlink getBack() {
        return back;
    }

    public void setBack(Hyperlink h) {
        this.back = h;
    }
    // </editor-fold>

    public fragCentral4() {
    }

    /**
     * <p>Callback method that is called whenever a page containing
     * this page fragment is navigated to, either directly via a URL,
     * or indirectly via page navigation.  Override this method to acquire
     * resources that will be needed for event handlers and lifecycle methods.</p>
     * 
     * <p>The default implementation does nothing.</p>
     */
    @Override
    public void init() {
        // Perform initializations inherited from our superclass
        super.init();
        // Perform application initialization that must complete
        // *before* managed components are initialized
        // TODO - add your own initialiation code here
        
        
        // <editor-fold defaultstate="collapsed" desc="Visual-Web-managed Component Initialization">
        // Initialize automatically managed components
        // *Note* - this logic should NOT be modified
        try {
            _init();
        } catch (Exception e) {
            log("Page1 Initialization Failure", e);
            throw e instanceof FacesException ? (FacesException) e: new FacesException(e);
        }
        
        // </editor-fold>
        // Perform application initialization that must complete
        // *after* managed components are initialized
        // TODO - add your own initialization code here
    }

    /**
     * <p>Callback method that is called after rendering is completed for
     * this request, if <code>init()</code> was called.  Override this
     * method to release resources acquired in the <code>init()</code>
     * resources that will be needed for event handlers and lifecycle methods.</p>
     * 
     * <p>The default implementation does nothing.</p>
     */
    @Override
    public void destroy() {
    }

    /**
     * <p>Return a reference to the scoped data bean.</p>
     *
     * @return reference to the scoped data bean
     */
    protected RequestBean1 getRequestBean1() {
        return (RequestBean1) getBean("RequestBean1");
    }

    /**
     * <p>Return a reference to the scoped data bean.</p>
     *
     * @return reference to the scoped data bean
     */
    protected SessionBean1 getSessionBean1() {
        return (SessionBean1) getBean("SessionBean1");
    }

    /**
     * <p>Return a reference to the scoped data bean.</p>
     *
     * @return reference to the scoped data bean
     */
    protected ApplicationBean1 getApplicationBean1() {
        return (ApplicationBean1) getBean("ApplicationBean1");
    }

    public String agsuscripcion() {
        agsus.setVisible(false);
        aginstruccion.setVisible(false);
        agpersonal.setVisible(false);
        ag1a.setVisible(true);
        ag1b.setVisible(true);
        ag1c.setVisible(true);
        agd.setVisible(true);
        ag1e.setVisible(true);
        ag1f.setVisible(true);
        back.setVisible(true);
        return null;
    }

    public String aginstruccion_action() {
        agsus.setVisible(false);
        aginstruccion.setVisible(false);
        agpersonal.setVisible(false);
        ag2a.setVisible(true);
        ag2b.setVisible(true);
        ag2c.setVisible(true);
        ag2d.setVisible(true);
        ag2e.setVisible(true);
        ag2f.setVisible(true);
        ag2g.setVisible(true);
        ag2h.setVisible(true);
        back.setVisible(true);
        return null;
    }

    public String agpersonal_action() {
        agsus.setVisible(false);
        aginstruccion.setVisible(false);
        agpersonal.setVisible(false);
        ag3a.setVisible(true);
        ag3b.setVisible(true);
        ag3c.setVisible(true);
        ag3d.setVisible(true);
        ag3e.setVisible(true);
        ag3f.setVisible(true);
        back.setVisible(true);
        return null;
    }

}
